﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NeoseekerDesktop
{
    public partial class MainForm : Form
    {
        #region MemberVariables

        #region APIVariables
        private static string contactsAPI = "http://chiggins.vndv.com/user_contacts_info.php";
        private static string favoriteForumsAPI = "http://chiggins.vndv.com/user_favorite_forums.php";
        private static string pmInfoAPI = "http://chiggins.vndv.com/user_pm_info.php";
        public static string PMInfoAPI
        {
            get { return pmInfoAPI; }
        }
        #endregion

        Timer timer = new Timer();

        #endregion

        public MainForm()
        {
            InitializeComponent();

            // Timer
            this.timer.Interval = 60000;
            this.timer.Tick += new EventHandler(timerTick);
            this.timer.Start();
        }

        #region EventHandlers
        #region Timer
        private void timerTick(object sender, EventArgs e)
        {
            
        }
        #endregion
        #region MainMenu
        #region File

        private void SettingsFileMenuItem_Click(object sender, EventArgs e)
        {
            Forms.SettingsForm settingsForm = new Forms.SettingsForm();
            settingsForm.Show();
        }

        private void ExitFileMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        #endregion
        #region Help
        private void AboutHelpMenuItem_Click(object sender, EventArgs e)
        {
            Forms.AboutForm aboutForm = new Forms.AboutForm();
            aboutForm.Show();
        }
        #endregion
        #endregion
        #endregion

        public static string constuctAPICallURL(string url)
        {
            return url + "?username=" + NeoseekerDesktop.Properties.Settings.Default.Username + "&token=" + NeoseekerDesktop.Properties.Settings.Default.Token;
        }

        public static string constuctAPICallURL(string url, string username, string token)
        {
            return url + "?username=" + username+ "&token=" + token;
        }
    }
}
